package com.ruoyi.project.meal.service.impl;

import java.util.List;

import com.ruoyi.project.meal.domain.MealMilkList;
import com.ruoyi.project.meal.mapper.MealMilkListMapper;
import com.ruoyi.project.meal.service.IMealMilkListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.text.Convert;

/**
 * 牛奶明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-14
 */
@Service
public class MealMilkListServiceImpl implements IMealMilkListService
{
    @Autowired
    private MealMilkListMapper mealMilkListMapper;

    /**
     * 查询牛奶明细
     * 
     * @param id 牛奶明细ID
     * @return 牛奶明细
     */
    @Override
    public MealMilkList selectMealMilkListById(Integer id)
    {
        return mealMilkListMapper.selectMealMilkListById(id);
    }

    /**
     * 查询牛奶明细列表
     * 
     * @param mealMilkList 牛奶明细
     * @return 牛奶明细
     */
    @Override
    public List<MealMilkList> selectMealMilkListList(MealMilkList mealMilkList)
    {
        return mealMilkListMapper.selectMealMilkListList(mealMilkList);
    }

    /**
     * 新增牛奶明细
     * 
     * @param mealMilkList 牛奶明细
     * @return 结果
     */
    @Override
    public int insertMealMilkList(MealMilkList mealMilkList)
    {
        return mealMilkListMapper.insertMealMilkList(mealMilkList);
    }

    /**
     * 修改牛奶明细
     * 
     * @param mealMilkList 牛奶明细
     * @return 结果
     */
    @Override
    public int updateMealMilkList(MealMilkList mealMilkList)
    {
        return mealMilkListMapper.updateMealMilkList(mealMilkList);
    }

    /**
     * 删除牛奶明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMealMilkListByIds(String ids)
    {
        return mealMilkListMapper.deleteMealMilkListByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除牛奶明细信息
     * 
     * @param id 牛奶明细ID
     * @return 结果
     */
    @Override
    public int deleteMealMilkListById(Integer id)
    {
        return mealMilkListMapper.deleteMealMilkListById(id);
    }
}
